<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>通讯录管理登录页面</title>

</head>
<body>

<br>
<br>
<br>
<br>	
<br>	
<form action="/admin/login" method="post">
<table width="30%" border="0" align="center">
  <tr>
    <th colspan="2" scope="col">通讯录管理登录页</th>
  </tr>
  <tr>
    <th scope="row">用户名：</th>
    <td><input type="text"  placeholder="用户名" name="username"></td>
  </tr>
  <tr>
    <th scope="row">密码：</th>
    <td><input type="password" placeholder="密码" name="password"></td>
  </tr>
  <tr>
    <th scope="row">&nbsp;</th>
    <td><button type="submit">登录</button></td>
  </tr>
  <tr>
    <th colspan="2" scope="row"><c:if test="${not empty error }"><span class="label label-warning">${error}</span></c:if></th>
  </tr>
</table>

</form>



<br><br><br><br><br><br><br>


		
	<script src="<%=request.getContextPath()%>/resources/js/jquery-1.9.0.min.js"></script>

<script type="text/javascript">
   $(document).ready(function(){
	   $("form").validate({
			rules: {
				username: {required:true,maxlength:30},
				password: {required:true,maxlength:16}
			},
			messages: {
				username: {required:"用户名不能为空",maxlength:"最大为30个字符"},
				password: {required:"密码不能为空",maxlength:"最大为16个字符"}
				}
			});
   });

</script>
</body>
</html>